package com.neusoft.neuiotms.dcom.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_operation_support_weekly", uniqueConstraints = @UniqueConstraint(columnNames = {"companyCode",
        "weekDate" }))
@org.hibernate.annotations.Table(appliesTo = "neuiot_operation_support_weekly", comment = "运维支撑服务周报表")
public class OperationSupportWeekly extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 单位名称 */
    //    @NotNull(message = "单位名称")
    @Length(max = 225, message = "单位名称不能超过{max}位")
    @Column(length = 225, nullable = true)
    @Comment("varchar(225) NOT NULL COMMENT '单位名称'")
    private String companyName;

    /** 单位编码 */
    //    @NotNull(message = "单位编码")
    @Length(max = 225, message = "单位编码不能超过{max}位")
    @Column(length = 225, nullable = true)
    @Comment("varchar(225) NOT NULL COMMENT '单位编码'")
    private String companyCode;

    /** 创建人员 */
    @NotNull(message = "创建人员")
    @Length(max = 225, message = "创建人员不能超过{max}位")
    @Column(length = 225, nullable = false)
    @Comment("varchar(225) NOT NULL COMMENT '创建人员'")
    private String userName;

    /** 创建人员编码 */
    @NotNull(message = "创建人员编码")
    @Length(max = 225, message = "创建人员编码不能超过{max}位")
    @Column(length = 225, nullable = false)
    @Comment("varchar(225) NOT NULL COMMENT '创建人员编码'")
    private String userCode;

    /** 服务项目 */
    @Length(max = 225, message = "服务项目不能超过{max}位")
    @Column(length = 225, nullable = true)
    @Comment("varchar(225) NOT NULL COMMENT '服务项目'")
    private String serviceItem;

    /** 实际到场人数 */
    @NotNull(message = "实际到场人数不能为空")
    @Comment("int(5) NULL COMMENT '实际到场人数'")
    private int actualAttendanceNumber;

    /** 本周工作情况 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '本周工作情况'")
    private String weekWorkInfo;

    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '下周工作计划'")
    private String nextWeekWorkPlan;

    /** 总结描述 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '总结描述'")
    private String summaryDesc;

    /** 问题记录及解决方案 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '问题记录及解决方案'")
    private String problemOrSolution;

    /** 备注 */
    @Lob
    @Column(columnDefinition = "longtext")
    @Comment("longtext COMMENT '备注'")
    private String remark;

    /** 周次 */
    @NotNull
    @Column(nullable = false)
    private Date weekDate;

    /**
     * 附件存储，用||分割多个文件；用@@分割fsId和文件name <br />
     * 16109709907255005.png@@报警通知.png||16109709907255001.png@@报警通知2.png
     */
    @Column(length = 2047, nullable = true)
    private String attachment;
}
